<!--
 * @Author: wangming
 * @Date: 2021-04-15 16:04:13
 * @LastEditors: wangming
 * @LastEditTime: 2021-12-16 17:43:25
 * @Description: file content
-->
<template>
  <div>
    <el-form-item
      label="URL地址"
      prop="__config.url"
      :rules="[
        {
          required: true,
          message: '地址不能为空',
          trigger: 'blur',
        },
        { pattern: URL_REG, message: '请输入有效地址', trigger: 'blur' },
      ]"
    >
      <el-input
        v-model="value.__config.url"
        size="small"
        placeholder="请输入"
      ></el-input>
    </el-form-item>
    <el-form-item label="是否平台认证" class="tr">
      <el-switch v-model="value.__config.authToken" />
    </el-form-item>
    <el-form-item label="只显示内容区域" class="tr">
      <el-switch v-model="value.__config.showContent" />
    </el-form-item>
    <el-form-item label="从父容器获取高度" class="tr">
      <el-switch v-model="value.__config.auto" />
    </el-form-item>
    <el-form-item label="容器高度 px" v-if="!value.__config.auto">
      <el-input-number
        style="width: 100%"
        v-model="value.__config.height"
        controls-position="right"
        :min="1"
      ></el-input-number>
    </el-form-item>
  </div>
</template>
<script>
import basicmixins from "./basicmixins";
import { URL_REG } from "@/utils/reg";
export default {
  mixins: [basicmixins],
  data() {
    return { URL_REG };
  },
  methods: {},
};
</script>

<style lang="scss" scoped></style>
